home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d8
/
msk31doc.arc
/
MSIHAY.SCR
< prev
next >
Wrap
Text File
|
1991-03-26
|
3KB
|
55 lines
; FILE HAYES.SCR (stored in Kermit Distribution as MSIHAY.SCR)
;
; An MS-DOS Kermit 3.0 script program for dialing a Hayes 2400
; Smartmodem and compatibles. Also works with ROLMphone 244PC.
; Expects variable %\1 to contain the phone number; this is done
; by the DIAL macro defined in MSKERMIT.INI. Items marked by
; "***" might need editing.
;
; Uses ATD (modem's default dialing method) to dial the number.
; Force tone dialing by including T as first character of phone
; number, or pulse dialing by including P as first character.
;
; Author: Christine M. Gianone, January 1990, updated March 1991.
;
def errstp echo Error: \%1,hang,pop
set speed 2400 ; *** Change or remove if necessary!
set input timeout proceed ; Allow IF SUCCESS, IF FAILURE
set input echo off ; Don't echo the modem test
output ATQ0V1\13 ; Send AT, use word result codes.
input 2 OK ; Modem should say "OK"
if fail errstp {Turn on or connect your modem!}
clear ; Clear input buffer
set count 5 ; Set up dialing retry counter
set input echo on ; From now on, show what happens
echo Dialing \%1, wait...
goto dial ; 1st time, skip Redialing message
:REDIAL
echo Redialing... ; Message for redialing.
:DIAL
output ATD\%1\13 ; *** Dial the number (ATDT or ATDP)
set alarm 60 ; Detect keyboard interruptions.
input 55 \10 ; Wait for the linefeeds...
input 5 \10 ; that surround response message.
if success goto gotmsg ; Got a message.
if alarm errstp {No response from modem.} ; No response in 60 secs.
hangup ; User interrupted from keyboard,
goto again ; so try again right away
:GOTMSG
reinput 2 CONNECT ; Got message, was it CONNECT?
if success goto speed ; Yes, go check the speed.
reinput 2 BUSY ; Not CONNECT, was it BUSY?
if failure errstp {No dialtone or no answer.}
Echo Busy, wait... ; Phone was busy, give message.
hangup ; Hang up.
pause 60 ; Wait one minute.
:AGAIN
if count goto redial ; Then go redial.
errstp {It never answers! I give up.} ; Too many tries.
:SPEED ; Connected!
echo \7 ; Celebrate with a beep.
reinput 1 1200 ; Was message CONNECT 1200?
if success set speed 1200 ; Yes, change the speed.